package com.library.service;

import com.library.dao.UserActionMapper;
import com.library.entity.UserAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/6/13.
 */
@Service("UserActionService")
public class UserActionImpl implements UserActionService{

    @Autowired
    private UserActionMapper userActionMapper;

    @Override
    public void addUserAction(UserAction userAction) {
        userActionMapper.insert(userAction);
    }

    @Override
    public List<UserAction> findsUserAction(int id) {
        return userActionMapper.findAllUserAction(id);
    }

    @Override
    public UserAction findById(int id) {
        return userActionMapper.selectByPrimaryKey(id);
    }
}
